package com.moblie.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.moblie.domain.Merchant;
import com.moblie.entity.Result;
import com.moblie.service.MerchantService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述:
 * 商家详情
 *
 * @author 景远超
 * @create 2020-05-30 16:30
 */
@RestController
@RequestMapping("/Merchant")
public class MerchantController {
    @Reference
    private MerchantService merchantService;

    @RequestMapping("/details")
    public Result MerchantDetails(Integer id){
        try {
            Merchant merchant = merchantService.findMerchantDetailsById(id);
            return new Result(true, com.moblie.constant.MessageConstant.GET_MERCHANTDETAILS_SUCCESS,merchant);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return new Result(false, com.moblie.constant.MessageConstant.GET_MERCHANTDETAILS_FAIL);
    }
}
